package com.cyan.note.service.manager;

import com.cyan.note.common.ApiResult;
import com.cyan.note.common.PageResult;
import com.cyan.note.dto.manager.customer.CustomerListDTO;
import com.cyan.note.dto.manager.customer.CustomerValidationDTO;
import com.cyan.note.entity.Customer;

import java.util.List;

/**
 * 店长端-客户管理服务接口
 * 
 * @author ZhangzhenYu
 * @since 2025-01-15
 */
public interface ManagerCustomerService {

    /**
     * 分页查询客户列表
     */
    ApiResult<PageResult<CustomerListDTO>> getCustomerList(Long shopId, Integer page, Integer size, 
            String keyword, String status, String level, String source, String registerStart, 
            String registerEnd, String minAmount, String maxAmount, String minOrders, 
            String maxOrders, String sortBy, String sortOrder);

    /**
     * 查询客户详情
     */
    ApiResult<Customer> getCustomerDetail(Long shopId, Long customerId);

    /**
     * 新增客户
     */
    ApiResult<Void> createCustomer(Customer customer, Long operatorId);

    /**
     * 更新客户信息
     */
    ApiResult<Void> updateCustomer(Customer customer, Long operatorId);

    /**
     * 删除客户
     */
    ApiResult<Void> deleteCustomer(Long shopId, Long customerId, Long operatorId);

    /**
     * 客户校验（用于手动下单时的客户搜索）
     */
    ApiResult<CustomerValidationDTO> validateCustomer(Long shopId, String nickname);

    /**
     * 更新客户状态
     */
    ApiResult<Void> updateCustomerStatus(Long shopId, Long customerId, String status, Long operatorId);

    /**
     * 更新客户等级
     */
    ApiResult<Void> updateCustomerLevel(Long shopId, Long customerId, String level, Long operatorId);
}